90 CLS:FOR I=1 TO 10:PRINT :NEXT I:PRINT" Please wait while you travel to the DUNGEON" :REM /////CHANGE THIS AS NEEDED/////
95 GOTO 22000
96 REM
100 REM /// give room description if never here, then get command
110 PRINT
115 IF SPD>0 THEN SPD=SPD-1:IF SPD=0 THEN MD(0,2)=MD(0,2)/2:MD(0,10)=MD(0,10)-2*MD(0,2)
117 IF ROOM < 89 AND (AD(1,4) <> ROOM AND AD(1,4) <> -1) THEN PRINT: PRINT"It is too dark to see anything.":GOTO 160
120 IF V(ROOM) THEN GET#2,ROOM:PRINT"You are standing in ";R2$
125 IF NOT V(ROOM) THEN GET#1,ROOM:PRINT FND$(R1$):IF ROOM=16 THEN DIE = -1:GOTO 23000
130 FOR M=1 TO NM:IF MD(M,5)=ROOM AND MD(M,15) THEN PRINT MN$(M);" is here."
135 IF MD(M,5)=ROOM AND MD(M,15)=0 THEN GET#3,M+NZ:PRINT FND$(R3$):MD(M,15)=-1
140 NEXT M:FOR A=1 TO NA-1:IF AD(A,4)=ROOM AND (A<NA) AND NOT V(ROOM) THEN GET#3,A:PRINT FND$(R3$)
145 IF AD(A,4)=ROOM AND (A<NA) AND V(ROOM) THEN PRINT"You see ";AN$(A)
150 NEXT A:IF AD(NA,4)=ROOM THEN PRINT"Your ";AN$(A);" is here."
155 V(ROOM)=-1
157 IF RZ=0 AND ROOM=52 THEN PRINT:PRINT E1$
160 PRINT:LINE INPUT" Your command ?";A$
161 IF A$="" THEN A$=CZ$:PRINT:PRINT A$
163 GOSUB 31000
175 CZ$=A$:A=INSTR(2,A$," ")
180 IF A<>0 THEN V$=LEFT$(A$,A-1):S$=MID$(A$,A+1) ELSE V$=A$:S$=""
185 IF LEFT$(S$,1)=" " THEN S$=MID$(S$,2):GOTO 185
190 FOR C=1 TO NC:IF C$(C)=V$ OR C$(C)=S$ THEN 195 ELSE NEXT C
191 PRINT"Huh? I only understand these commands--"
192 FOR C=1 TO NC:PRINT C$(C);SPACE$(30-LEN(C$(C)));
193 IF C/2=INT(C/2) THEN PRINT
194 NEXT C:PRINT:PRINT:GOTO 160
195 IF C$(C)=S$ THEN S$=V$:V$=C$(C)
200 ON C GOTO 1000,1000,2000,3000,4000,4000,5000,5000,5000,5000,5000,5000,5000,5000,5000,5000,5000,5000,6000,7000,8000,10000,11000,11000,13000,14000,15000,16000,17000,17000,17000,18000,18000,19000,21000,21500,21500,9000
340 IF MD(M,4)<MR THEN PRINT:PRINT MN$(M);" flees out an exit.":PRINT:GOSUB 17500:MD(M,5)=R2:TD(MD(M,14))=TD(MD(M,14))-MD(M,1):FD(MD(M,14))=FD(MD(M,14))-MD(M,13):GOTO 430
350 IF MD(M,14)<>0 THEN 390
360 OF=M:IF TD(1)=MD(0,1) THEN DF=0:GOSUB 3500:GOTO 430
370 SKIP=0:FOR M2=1 TO NM:IF MD(M2,5)=ROOM AND (MD(M2,14)<>0) AND RND(1)<.25 THEN DF=M2:GOSUB 3500:M2=200:SKIP=-1
380 NEXT M2:IF SKIP THEN 430 ELSE DF=0:GOSUB 3500:GOTO 430
390 OF=M
400 SKIP=0:FOR M2=1 TO NM:IF MD(M2,5)=ROOM AND MD(M2,14)=0 THEN DF=M2:GOSUB 3500:M2=200:SKIP=-1
410 NEXT M2:IF SKIP THEN 430 ELSE 400
420 REM
430 NBTL=(FD(0)<TD(0))
435 IF NBTL THEN NEXT M
440 REM
450 GOTO 100
460 REM
470 REM
1000 REM /// get command
1010 GOSUB 1950
1030 IF S$="ALL" THEN 1120
1040 IF S$="GOLD" THEN S$=AN$(6)
1050 IF S$="SILVER" THEN S$=AN$(12)
1080 FOR A=1 TO NA:IF AN$(A)<> S$ OR AD(A,4)<>ROOM THEN NEXT A:PRINT:PRINT"I see no ";S$;" here!":PRINT:GOTO 100
1085 IF A=10 THEN GOSUB 1160
1090 IF WT+AD(A,3)>10*MD(0,1) THEN PRINT:PRINT"It is too heavy for you.":PRINT:GOTO 100
1100 PRINT:PRINT"Got it.":AD(A,4)=-1:WT=WT+AD(A,3):PRINT:IF AD(A,2)<2 OR MD(0,9)<>-1 THEN 300
1110 GOTO 16000
1115 IF A=10 THEN GOSUB 1160
1120 FOR A=1 TO NA:IF AD(A,4)<>ROOM THEN 1150
1130 IF WT+AD(A,3)>10*MD(0,1) THEN PRINT AN$(A);" is too heavy.":GOTO 1150
1160 PRINT:PRINT"As you touch the jewel, an electric shock runs up your arm. You hear a voice":PRINT"chuckling, as it says 'I told you not to touch it!":PRINT:MD(0,13)=MD(0,13)+MD(0,1)/2
1170 DF=0:IF MD(0,13) >= MD(0,1) THEN 3700
1180 GOTO 3665
1950 IF S$="" THEN PRINT:PRINT C$(C);" what ";:A3$=A$:INPUT A$:GOSUB 31000:S$=A$:A$=A3$:GOTO 1950
1955 A$=S$:GOSUB 31000:S$=A$
1960 RETURN
2000 REM /// drop command
2010 GOSUB 1950
2020 IF NBTL THEN PRINT:PRINT"You can't do that with unfriendlies about!":PRINT:GOTO 100
2030 IF S$="ALL" THEN 2060
2040 FOR A=1 TO NA:IF AN$(A)<>S$ OR AD(A,4)<>-1 THEN NEXT A:PRINT"You aren't carrying a ";S$:GOTO 100
3605 D=MD(OF,11):S=MD(OF,12):A=1:IF RL>5 THEN PRINT"a hit!":GOTO 3650
3610 PRINT"a critical hit!":R2=INT(100*RND(1)+1):IF R2<51 THEN A=0:GOTO 3650
3615 IF R2<86 THEN S=1.5*S:GOTO 3650
3620 IF R2<96 THEN D=2*D:GOTO 3650
3625 IF R2<100 THEN D=3*D:GOTO 3650
3630 GOTO 3700
3650 D2=0:FOR D3=1 TO D:D2=D2+INT(S*RND(1)+1):NEXT D3:D2=D2-A*MD(DF,8):IF D2<1 THEN PRINT" blow bounces off armour":PRINT:RETURN
3655 MD(DF,13)=MD(DF,13)+D2:IF MD(DF,13)>=MD(DF,1) THEN 3700
3660 A=MD(DF,14):FD(A)=FD(A)+D2
3665 ON INT(MD(DF,13)*5/MD(DF,1)+1) GOTO 3670,3675,3680,3685,3690
3670 PRINT:PRINT MN$(DF);" takes damage but is still in good shape.":RETURN
3675 PRINT:PRINT MN$(DF);" is hurting.":RETURN
3680 PRINT:PRINT MN$(DF);" is in pain.":RETURN
3685 PRINT:PRINT MN$(DF);" is very badly injured.":RETURN
3690 PRINT:PRINT MN$(DF);"is at death's door, knocking loudly.":RETURN
3700 PRINT MN$(DF);" is dead!":PRINT:A=MD(DF,14):FD(A)=FD(A)+MD(DF,1)-MD(DF,13)+D2:MD(DF,5)=0:A2=NZ-NM+DF:AD(A2,4)=ROOM:IF MD(DF,9)>0 THEN AD(MD(DF,9),4)=ROOM
3710 IF FD(0)>TD(0) THEN NBTL=0
3720 IF DF=0 THEN DIE=-1:GOTO 23010
3730 IF (MN$(DF)="SKELETON" OR MN$(DF) = "HIGH PRIEST") AND AD(2,4) = 0 THEN PRINT:PRINT"A skeleton key drops from his clutches":PRINT:AD(2,4)=ROOM
3750 PRINT:RETURN
3760 REM
4000 REM /// look command
4010 IF NBTL THEN 2020
4030 V(ROOM)=0
4040 FOR A=1 TO NZ:IF AN$(A)=S$ AND (AD(A,4)=ROOM OR AD(A,4)=-1) THEN GET#3,A:PRINT FND$(R3$)
4050 NEXT A
4060 GOTO 100
4080 REM
5000 REM /// movement command
5010 IF NBTL THEN 2020
5020 FOR D=1 TO 6:IF LEFT$(V$,1)<>MID$("NSEWUD",D,1) THEN NEXT
5030 R2=MAP(ROOM,D)
5040 IF R2>0 THEN 5100
5045 REM /// put special moves here
5050 IF R2=-999 THEN PRINT:PRINT"You successfully ride off into the sunset.":GOTO 23010
5060 IF R2 = 0 THEN 5090
5070 IF AD(3,4)=ROOM THEN R2=-R2:GOTO 5100
5080 IF ROOM = 54 AND AD(17,4)=0 THEN R2=-R2:GOTO 5100
5090 PRINT:PRINT"You can't go that way!":V(ROOM)=0:GOTO 100
5165 IF (R2>8 AND R2<17) OR (R3>8 AND R3<17) THEN AD(3,4)=ROOM
5170 GOTO 100
6000 REM /// power spell
6010 S=4:GOSUB 7500:IF NOT SUC THEN 300
6020 RAISE=0:FOR M=1 TO NM:M2=13+M:IF AD(M2,4)=ROOM OR AD(M2,4)=-1 THEN RAISE=-1:PRINT MN$(M);" come alive!":AD(M2,4)=0:MD(M,5)=ROOM:MD(M,13)=0:IF MD(M,9)>0 THEN AD(MD(M,9),4)=0:IF MD(M,9)=MD(0,9) THEN MD(0,9)=0
6030 NEXT M:IF RAISE THEN NBTL=0:R2=ROOM:GOTO 5100
6040 FOR A=1 TO NA:IF AD(A,4)=ROOM THEN RAISE=-1:PRINT AN(A);" vanishes!":AD(A,4)=0
6050 NEXT A:IF RAISE THEN PRINT:GOTO 300
6060 RR=INT(100*RND(1)+1):IF RR<11 THEN PRINT:PRINT"The section of tunnel you are in collapses and you die.":DIE=1:GOTO 23010
6070 IF RR<31 THEN PNT:PRINT"You are teleported somewhere in the dungeon":PRINT:R2=INT(26*RND(1)+1):NBTL=0:GOTO 5100
6080 IF RR<86 THEN PRINT:PRINT"You hear a very loud sonic boom that echoes through the tunnels.":PRINT:GOTO 300
6090 IF RR>95 THEN PRINT:PRINT"All of your hits are healed.":PRINT:MD(0,13)=0:GOTO 300
6100 GOTO 10020
7000 REM /// heal spell
7010 S=2:GOSUB 7500:IF NOT SUC THEN 300
7020 PRINT:IF MD(0,13)<>0 THEN PRINT"Some of your wounds seem to clear up.":PRINT
7030 MD(0,13)=MD(0,13)-INT(10*RND(1)+1):IF MD(0,13)<0 THEN MD(0,13)=0
7040 ON INT(MD(DF,13)*5/MD(DF,1)+1) GOTO 7045,7050,7060,7070,7080
7045 PRINT"You feel great!.":PRINT:GOTO 7100
7050 PRINT"You feel much better.":PRINT :GOTO 7100
7060 PRINT"You feel better.":PRINT:GOTO 7100
7070 PRINT"Though you feel better, you are still very,very sick!":PRINT :GOTO 7100
7080 PRINT"Though you feel better, you are still at death's door knocking loudly!":PRINT
7090 REM
7100 GOTO 300
7495 REM
7496 REM try out success on spell
7497 REM
7500 SUC=0:IF SA(S)<>0 THEN RL=INT(100*RND(1)+1):SUC=(((RL<=S2(S)) OR (RL<5)) AND (RL<95))
7510 IF NOT SUC THEN PRINT:PRINT"Nothing happened.":RETURN
7520 RL=INT(100*RND(1)+1):IF RL>S2(S) THEN S2(S)=S2(S)+2:SA(S)=SA(S)+2
7525 IF RL=100 THEN SA(S)=0:S2(S)=0:PRINT"The power required to cast this spell overloaded your mind and you forgot it!"
7530 S2(S)=S2(S)/2
7540 RETURN
8000 REM /// blast spell (alright!!!)
8010 GOSUB 1950
8020 FOR M=1 TO NM:IF S$<>MN$(M) OR MD(M,5)<>ROOM THEN NEXT M:PRINT:PRINT"You can't blast ";S$;"!":PRINT:GOTO 300
9020 IF AD(9,4)<>-1 THEN PRINT:PRINT"The ground is too hard to dig with your hands.":PRINT:GOTO 300
9030 IF ROOM <> 27 OR AD(6,4) <> 0 THEN PRINT:PRINT:YOU FIND NOTHING.":PRINT:GOTO 300
9040 PRINT:PRINT"You find a bag of gold coins!":PRINT:AD(6,4)=ROOM:GOTO 300
10000 REM /// speed spell
10010 S=3:GOSUB 7500:IF NOT SUC THEN 300
10020 IF SPD=0 THEN MD(0,10)=MD(0,10)+2*MD(0,2):MD(0,2)=2*MD(0,2)
10030 SPD=INT(25*RND(1)+1:PRINT:PRINT"You can feel the new agility flowing through you!":PRINT:GOTO 300
11000 REM /// smile & wave command
11010 FOR I=1 TO NM
11020 PRINT MN$(I);
11030 IF MD(I,14)=0 THEN PRINT" growls at you." :GOTO 11040
11035 IF V$="WAVE" THEN PRINT " waves back." ELSE PRINT " smiles back."
11040 NEXT I
11050 GOTO 100
13000 REM /// say command
13010 GOSUB 1950
13020 IF S$="MAGIC" AND AD(8,4)=0 AND ROOM=5 THEN PRINT:PRINT"As you say the word, there is a small eruption from the center of the stone and an emerald pops out from it.":PRINT:AD(8,4)=ROOM
13030 IF S$="POWER" THEN 6000
13040 IF S$="HEAL" THEN 7000
13050 IF S$="BLAST" THEN 8000
13060 IF S$="SPEED" THEN 10000
13070 PRINT:PRINT"Okay, '";S$;"'":PRINT:GOTO 300
14000 REM /// drink command
14010 GOSUB 1950
14020 IF NBTL THEN 2020
14500 IF S$<>"WATER" OR RIGHT$(S$,3)<>"SEA" THEN PRINT:PRINT"A job similar to getting blood from a turnup.":PRINT:GOTO 300
14510 IF MD(5,4)<>-1 AND MD(5,4)<>ROOM AND (ROOM<6 OR ROOM>27) THEN PRINT:PRINT"There is no ";S$;" here!":PRINT:GOTO 300
14520 PRINT:PRINT"The water tasted salty, but it doesn't seem to be poisonous.":PRINT:IF MD(5,4) THEN MD(5,4)=0
14530 GOTO 300
15000 REM ///read command
15010 GOSUB 1950
15020 IF NBTL THEN 2020
15030 IF (S$="BOOK" OR S$="BOOKS" OR S$=AN$(11)) AND (AD(11,4)=-1 OR AD(11,4)=ROOM) THEN PRINT:PRINT"You cannot understand the words.":PRINT:GOTO 300
15040 IF S$="WORD" OR S$="CIGAM" OR S$="MAGIC" THEN IF ROOM = 5 THEN 13000
15110 PRINT"I see no markings here!"
15120 GOTO 300
16000 REM ///ready a weapon
16010 GOSUB 1950
16020 FOR A=1 TO NA:IF AN$(A)<>S$ OR AD(A,4)<>-1 THEN NEXT A:PRINT:PRINT"You aren't carrying it!":PRINT:GOTO 100
16030 IF AD(A,2)<2 THEN PRINT:PRINT"That isn't a weapon!":PRINT:GOTO 100
17010 IF NOT NBTL THEN PRINT:PRINT"What are you fleeing from?":PRINT:GOTO 100
17030 M=0:GOSUB 17500
17040 NBTL=0:GOTO 5100
17500 ' map is in memory now
17510 R2=MAP(ROOM,INT(6*RND(1)+1)):IF R2<1 THEN 17510
17520 RETURN
18000 REM /// inventory command
18005 PRINT:PRINT"You are carrying the following --":FOR A=1 TO NA:IF AD(A,4)=-1 THEN PRINT" ";AN$(A);:IF MD(0,9)=A THEN PRINT" (Ready Weapon)" ELSE PRINT
18010 NEXT A:GOTO 100
19000 REM /// enter command
19005 IF NBTL THEN 2020
19010 GOSUB 1950
19020 IF S$<>"WATER" AND S$<>"SEA" THEN 19040
19030 PRINT:PRINT"Sorry, but I'm afraid to go into the water without my life preserver!":PRINT:GOTO 300
19040 IF S$="BOAT" THEN PRINT:PRINT"Okay.":PRINT:GOTO 300
19050 PRINT:PRINT"I'm not sure what you mean by that. Try giving a direction to move.":PRINT:GOTO 100
19060 REM
20000 REM /// give command
20001 GOSUB 1950
20003 PRINT:INPUT"To Who ";M1$:IF M1$="" THEN 20003
20004 A$=M1$:GOSUB 31000:M1$=A$
20005 FOR M1=1 TO NM:IF MN$(M1)=M1$ AND MD(M1,5)=ROOM THEN 20010
20006 NEXT M1:PRINT:PRINT"Give ";S$;" to who??":PRINT:GOTO 100
20010 FOR I1=1 TO NA
20030 IF S$<>AN$(I1) OR AD(I1,4)<>-1 THEN 20100
20040 IF AD(I1,2)<2 OR MD(I1,14)=0 THEN PRINT:PRINT"It is refused.":GOTO 300
21020 IF S$<>"COFFIN" OR ROOM <> AD(16,4) THEN 21050
21030 IF E1 THEN PRINT : PRINT "You can't open it.": PRINT : GOTO 300
21040 E1=-1:PRINT:PRINT"As you begin to open the lid, a skeleton jumps out and attacks you as the lid":PRINT"slams back shut.":PRINT:MD(1,5)=ROOM:R2=ROOM:GOTO 5100
21050 IF S$="DOOR" AND ROOM <> AD(17,4) THEN PRINT:PRINT"The door will open when you move through it.":PRINT:GOTO 100
21060 IF S$="DOOR" OR S$="GRATE" OR S$="IRON GRATE" THEN 20000
21070 PRINT:PRINT"Would you have any bloody ideas how?":GOTO 100
21500 REM ///UNLOCK COMMAND
21510 IF NBTL THEN 2020
21520 GOSUB 1950:IF LEFT$(S$,3) <> "DOO" AND LEFT$(S$,3) <> "GRA" AND LEFT$(S$,3) <> "IRO" THEN 21560
21530 IF ROOM <> AD(17,4) THEN PRINT:PRINT"It isn't locked.":PRINT:GOTO 300
21540 IF AD(2,4) <> -1 THEN PRINT:PRINT"You aren't carrying a key to unlock it with!":PRINT:GOTO 100
21550 PRINT:PRINT"As you unlock the iron grate, it crunbles into dust.":PRINT:AD(17,4)=0:GOTO 300
21560 FOR I=0 TO 6: IF LEFT$(S$,3) <> MID$("LARLILSLISVECHAROPFRI",I*3+1,3) THEN NEXT:PRINT:PRINT"I don't understand what you mean by ";CZ$:PRINT:GOTO 100
21570 IF RZ OR ROOM <> 52 THEN PRINT:PRINT"Huh? How can I ";CZ$;"?":PRINT:GOTO 100
21580 IF AD(2,4) <> -1 THEN PRINT:PRINT"You aren't carrying a key to do that!":PRINT:GOTO 100
22210 READ NC:DIM C$(NC):FOR C=1 TO NC:READ C$(C):NEXT C
22220 FOR S=1 TO 4:S2(S)=SA(S):NEXT S
22230 DIM V(96):ROOM=1
22232 FOR A=1 TO NA-1
22233 FOR B=A+1 TO NA:IF AN$(A)=AN$(B) THEN AN$(A)=AN$(A)+"#":GOTO 22233
22234 ' PRINT A,AN$(A),B,AN$(B)
22236 NEXT B:NEXT A
22241 PRINT:PRINT"(Hit any key to continue) ";
22242 A$=INKEY$:IF A$="" THEN 22242
22243 PRINT:PRINT:GOTO 100
22250 DATA 38
22260 DATA GET,PICK,DROP,ATTACK,LOOK,EXAMINE,UP,U,DOWN,D,NORTH,N,EAST,E,WEST,W,SOUTH,S,POWER,HEAL,BLAST,SPEED,SMILE,WAVE,SAY,DRINK,READ,READY,ESCAPE,RETREAT,FLEE,INVENTORY,I,ENTER,OPEN,UNLOCK,RELEASE,DIG
22270 END
23000 REM /// END GAME
23010 PRINT:PRINT"(Hit any key to continue) ";
23011 A$=INKEY$:IF A$="" THEN 23011 ELSE PRINT
23020 CLOSE#1:CLOSE#2:CLOSE#3
23030 AD(10,8)=10
23040 IF SPD THEN MD(0,2)=MD(0,2)/2
23050 IF DIE THEN 23240
23060 FOR W=2 TO 4:IF WN$(W)<>"NONE" THEN NEXT W
23070 W2=W:FOR W3=1 TO NA-1:IF AD(W3,2)>1 AND AD(W3,4)=-1 THEN WN$(W2)=AN$(W3):WP(W2)=W3:W2=W2+1:AD(W3,4)=0
23080 NEXT W3:IF W2<6 THEN 23160
23090 CLS:PRINT :PRINT :PRINT :PRINT :PRINT"As you try to enter the main hall, Sir William Missfire appears and tells you, 'You have too many weapons-- 4 is the leagal limit.'":PRINT:PRINT"Your weapons are---"
23100 FOR W4=1 TO W2-1:PRINT" ";W4;"--";WN$(W4):NEXT W4:PRINT:PRINT"Hit the number key for one to throw away. ( 1 -";W2-1;") ";
23110 A$=INKEY$:IF A$="" THEN 23110 ELSE W5=VAL(A$):IF W5<1 OR W5>W2-1 THEN 23110
23120 IF WP(W5)<>0 THEN AD(WP(W5),4)=-1
23130 WN$(W5)=WN$(W2-1):WP(W5)=WP(W2-1):W2=W2-1:IF W2>5 THEN 23090
23140 FOR W4=2 TO W2-1:FOR W5=1 TO W4-1:IF WN$(W4)=WN$(W5) THEN WN$(W4)=WN$(W4)+"#":GOTO 23140
23150 NEXT W5:NEXT W4
23160 FOR W=1 TO 4:IF WP(W)<>0 THEN WT(W)=AD(WP(W),6):WO(W)=AD(WP(W),5):WD(W)=AD(WP(W),7):WS(W)=AD(WP(W),8)
23170 NEXT W:CLS:LOCATE 5,1:PRINT"As you deliver your treasures to Sam Slicker, the local buyer of such things,":PRINT"he examines your goods and pays you ";
23180 TP=0:FOR A=1 TO NA-1:IF AD(A,4)<>-1 THEN 23210
23190 IF AD(A,2)<>0 THEN AD(A,1)=AD(A,1)*CH/10
23200 TP=INT(TP+AD(A,1))
23210 NEXT A:PRINT TP;"gold pieces.":PRINT
23220 GOLD=GOLD+TP
23230 PRINT:PRINT:PRINT"(Hit any key to continue) ";
23231 A$=INKEY$:IF A$="" THEN 23231 ELSE PRINT
23240 KILL"FRESHMEA.T"
23241 A$=INKEY$:PRINT:CLS:LOCATE 5,1:PRINT"(Insert EAMON MASTER diskette, then hit any key";:IF DIE THEN PRINT") "; ELSE PRINT " to goto Main Hall) ";
23242 A$=INKEY$:IF A$="" THEN 23242
23250 ON ERROR GOTO 24000
23251 IF DIE THEN KILL"ADVENTUR.ER":END
23260 OPEN"R",#1,"CHARACTE.RS",255
23261 GOSUB 30600
23262 FIELD 1,255 AS R1$
23263 LSET R1$=A$
23264 PUT#1,REC+1
23270 CLOSE#1
23290 OPEN "O",#1,"ADVENTUR.ER"
23291 PRINT#1,MN$(0):PRINT#1,REC
23292 CLOSE#1
23300 RUN"MAINHALL"
23310 STOP
24000 IF ERR=53 THEN 24100
24005 PRINT "Error #";ERR
24010 PRINT "At line";ERL
24020 PRINT:PRINT"Hit any key to continue"
24030 A$=INKEY$:IF A$="" THEN 24030
24040 RESUME NEXT
24050 STOP
24100 CLS
24110 IF A$<>"FRESHMEA.T" THEN 24005
24120 CLS
24130 PRINT"You must enter this program through the EAMON program and main hall."
24140 PRINT:PRINT:STOP
25000 REM /// get room move info
25010 LINE INPUT#1,R$
25030 FOR I=1 TO 6
25040 ML=INSTR(R$,",")
25045 IF ML=0 THEN MAP(ROOM,I)=VAL(R$):R$="":GOTO 25070
25050 MAP(ROOM,I)=VAL(LEFT$(R$,ML-1))
25060 R$=MID$(R$,ML+1)
25070 NEXT I
25080 FOR I=1 TO NM:FR=MD(I,3):IF FR <> 0 AND FR <> 100 THEN FR=FR+INT((CH-10)/2)
25090 MD(I,14)=ABS(FR>100*RND(1))
25100 NEXT
25110 RETURN
28000 T1=VAL(S$)
28010 IF T1>NR OR T1<1 THEN 300
28020 R2=T1:GOTO 5100
30000 REM
30010 REM break up record into its needed parts
30020 REM and damned be he the first to screw up this ordered set!!!
30030 REM
30031 REM HINT: a string of 37 commas will clear all fields!
30040 REM
30050 R$=B$
30060 W=1:X=1:Y=1:IF LEN(R$)=0 THEN R$=",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
30070 FOR I=1 TO 38
30075 A1$=""
30080 IF R$="" THEN 30555
30090 J=INSTR(R$,",")
30095 IF J<>0 THEN A1$=LEFT$(R$,J-1):R$=MID$(R$,J+1) ELSE IF R$<>"" THEN A1$=R$:R$=""
30100 REM
30110 REM
30120 ON I GOTO 30170,30180,30190,30200,30210,30210,30210,30210,30250,30250
30130 ON I-10 GOTO 30250,30250,30250,30300,30310,30320,30330,30340,30350,30360
30140 ON I-20 GOTO 30370,30380,30390,30350,30360,30370,30380,30390,30350,30360
30150 ON I-30 GOTO 30370,30380,30390,30350,30360,30370,30380,30390